"""taobaoshop URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/3.2/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path
from django.conf.urls import url

from taobaoshop import view

urlpatterns = [
    path('admin/', admin.site.urls),
    # 通过路由响应页面
    url(r'index/', view.index_taobao),
    url(r'login/', view.login_taobao),
    url(r'reg/', view.register_taobao),
    url(r'loginsuccess/', view.login_success_taobao),
    url(r'detailsgoods/', view.details_goods),
    url(r'shoppingcar/', view.shopping_car),

    # ajax通过路由发送请求
    url(r'register/', view.register),
    url(r'loginpsd/', view.loginpsd),
    url(r'sendmsg/', view.sendmsg),
    url(r'loginmsg/', view.loginmsg),

    # 通过a标签发送请求 实现退出登陆
    url(r'loginout/', view.loginout),

    # ajax请求 处理支付功能
    url(r'goodpay/', view.good_pay, name='good_pay'),
    url(r'alipay/result/', view.check_html_view, name='alipay_result/'),
]
